package com.hxw.schema.observer;

/**
 * Created by Think on 2018/5/5.
 */
public class NBAObjserver extends Observer {

    private String name;

    //private Subject subject;

    public NBAObjserver(String name){
        this.name = name;
    }

//    public NBAObjserver(String name,Subject subject){
//        this.name = name;
//        this.subject = subject;
//    }

    public void update() {
//        if(subject == null){
//            System.out.println("name = " + name + "没有得到通知，被罚款");
//        }else {
//            System.out.println("name = " + name + "得到通知，关闭NBA，好好工作");
//        }
        System.out.println("name = " + name + "得到通知，关闭NBA，好好工作");
    }
}
